<%@ include file="../common.jsp"%>

<c:choose>
	<c:when test="${size eq 0}">
		No Records Found.
	</c:when>
	<c:otherwise>
		<div style="width: 60%;">
			<table class="viewDetails">
				<tr class="adminTableMainHeaderColor tableChildHeaderFont">
					<th colspan="4" align="center"><span class="searchResultsCaption" > VIEW DOCUMENT SUB CATEGORY </span></th>
				</tr>
				<tr class="heading" align="center">
					<th> Code </th>
					<th> SubCategory </th>
					<th> Category </th>
					<th> Type </th>
				</tr>	
			
				<c:forEach var="docTypeMap" items="${docTypeMap}" varStatus="loop">
					<c:forEach items="${docTypeCatMap[docTypeMap.key]}" var="docCategory">
						<c:forEach items="${docCatSubCatMap[docCategory.dcId]}" var="docSubCategory">
							<c:set var="tabColor" value="odd"></c:set>
						     	<c:if test="${(loop.index % 3) eq 0}">
						        	<c:set var="tabColor" value="even"></c:set>
						        </c:if> 
						    <tr class="${tabColor}">   
						    	<td> ${docSubCategory.dscCode} </td>
								<td> ${docSubCategory.dscName} </td>
								<td> ${docCategory.dcName} </td>
								<td> ${docTypeMap.value} </td>
							</tr>
						</c:forEach>
					</c:forEach>
				</c:forEach>
			</table>
		</div>
	</c:otherwise>
</c:choose>